<!--
 * @Author: Wulala
 * @Date: 2025-03-24 11:26:08
 * @LastEditTime: 2025-04-15 15:30:45
 * @LastEditors: Wulala
 * @Description: 
 * @FilePath: \exchange\app\admin\view\appinfo\app_interface_config\indexs.html
 * 可以输入预定的版权声明、个性签名、空行等
-->
<style>
    body{
        color:#535353 !important
    }
    .balance-box{
        display: flex;
        align-items:center
    }
    .req{
        color: red;
    }
    .layui-input-block input{
        width: 50%;
    }
</style>
<div class="layuimini-container">
    <h2 style="margin-left: 30px;">接口配置</h2>
    <hr>
    <form id="app-form" class="layui-form layuimini-form">
        <input type="hidden" name="appid" value="{$rows.appid|default=''}">

        <div class="layui-form-item">
            <label class="layui-form-label">免登录接口：</label>
            <div class="layui-input-block">
                <input type="text" name="not_login" autocomplete="off" placeholder="该接口开放给客户端,通过生成免登录URL与兑吧同步信息"
                    class="layui-input" value="{$rows.not_login|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">积分消费通知:</label>
            <div class="layui-input-block balance-box">
                <input type="text" name="Integral_consumption" autocomplete="off" lay-verify="required" lay-reqtext="请输入地址" placeholder="该接口用来向您提交积分消费请求" class="layui-input"
                    value="{$rows.Integral_consumption|default=''}">
                <button type="button" class="layui-btn layui-btn-primary" style="margin-left: 10px;">测试</button>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">发货结果通知：</label>
            <div class="layui-input-block balance-box">
                <input type="text" name="send_goods_notice" autocomplete="off" lay-verify="required" lay-reqtext="请输入地址"  placeholder="该接口用来向您发送发货结果通知" class="layui-input"
                    value="{$rows.send_goods_notice|default=''}">
                <button type="button" class="layui-btn layui-btn-primary" style="margin-left: 10px;">测试</button>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">转账结果通知：</label>
            <div class="layui-input-block balance-box">
                <input type="text" name="pay_cash_notice" autocomplete="off" lay-verify="required" lay-reqtext="请输入地址"  placeholder="该接口用来向您发送转账结果通知" class="layui-input"
                    value="{$rows.pay_cash_notice|default=''}">
                <button type="button" class="layui-btn layui-btn-primary" style="margin-left: 10px;">测试</button>
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button class="layui-btn  layui-btn-normal layui-btn-sm" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<script src="/static/common/js/jquery-1.10.1.min.js"></script>


<script>
    layui.use(['form', 'layer'], function() {
        form = layui.form,
        layer = layui.layer,

        addLinkUrl = "addData"

        //监听提交
        form.on('submit(formDemo)', function(data){
            $.ajax({
                url:addLinkUrl,
                data: $('#app-form').serialize(),
                type:'POST',
                success:function(result){
                    if (result.code == 1) {
                        layer.alert(result.msg, {icon: 1});
                    }else{
                        layer.alert(result.msg, {icon: 2});
                    }
                },
                error:function (res) {
                    layer.alert(result.msg, {icon: 2});
                }
            });

            return false;
        })

    })
</script>